var assert=require('chai').assert;
var http=require('http');
var rest=require('restler');


suite('API tests',function(){
  var attration={
    lat:45.516011,
    lng:-122.682062,
    name:'Portland Art Museum',
    description:'Founded in 1982, the Portland Art Museum\'s collection'+
    'of native art is not to be missed.',
  };
  var base = 'http://localhost:3000';
  test('Should be able to add an attration',function(done){
    rest.post(base+'/api/attration',{data:attration}).on('success',function(data){
      assert.match(data.id,/\w/,'id mus be set');
      done();
    });
  });
});
